package logic

import (
	"context"
	"video-hubs/model/mysql"

	"video-hubs/videorpc/internal/svc"
	"video-hubs/videorpc/videorpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type ShouListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewShouListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShouListLogic {
	return &ShouListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ShouListLogic) ShouList(in *videorpc.ShouListRequest) (*videorpc.ShouListResponse, error) {
	// todo: add your logic here and delete this line
	var user mysql.Shou
	var lists []*videorpc.GetList1
	var err error
	lists, err = user.ShouList(mysql.DB, lists, in)
	if err != nil {
		return nil, err
	}
	return &videorpc.ShouListResponse{
		List1: lists,
	}, nil
}
